home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d20
/
lstcrc14.arc
/
LISTCRCS.DOC
< prev
next >
Wrap
Text File
|
1991-09-11
|
4KB
|
65 lines
LISTCRCS, as the name attempts to indicate, is a utility that "LISTs
CRCs, more precisely the type of CRC that the QM (aka QMail) and
Areafix programs are using as indexing hash codes in their handling
of EchoMail area tag names.
The problem with this CRC hashing approach is that there is a
non-negligible (i.e. non-zero, as far as I'm concerned) probability
that two area names may end up having the same CRC, which can lead
to cross-links between areas (with QM) or to the wrong area being
(dis)connected (with AreaFix).
The best known (in FidoNet) case of area name collision is probably the
one between the names MSGED and SMUT. It led to the first area being
renamed MSGED_ECHO. Closer to me, I painfully discovered a few months
ago that the new local area ADMIN167 was cross-linked with the large
international CLIPPER conference!
Be advised: this is a quick hack, though it represents for the C rookie
that I am a substantial accomplishment. To borrow an expression from
the DOC's of someone who started writing FidoNet software long before
me, I only guarantee it to do one thing, and that is to occupy space on
your disk. Comments and suggestions will receive as much consideration
as they will deserve, which is just another way to suggest that flames
should be redirected ( > ) to the NUL (or /dev/null) device.
Now, here is what this should do for you:
- LISTCRCS.EXE is a small-model Turbo C program, so (much) less than
128K will be necessary to run it.
- It is currently limited to 1024 areas and may crash and burn if fed a
longer list (or, as Chuck Forsberg puts it in some manual or other, it
may attempt to open a subspace channel to V'Ger... 8-). This can be
increased if I receive a reasonable request. By the same token,
maximum line length is set at 1023 characters.
- It reads a file named AREAS.BBS in the *current* directory, and
ignores both the first line (system and sysop name by convention) and
all blank lines that directly follow it.
- The first non-blank line it finds after that is used to determine if
the file is used by QuickBBS or Qm/Confmail. If the first character on
that line is numeric, the assumption is that the QuickBBS format
(area_number <spaces> area_tag ...) is used, otherwise QM/Confmail
(path_name <spaces> area_tag ...) format is assumed.
- That first area line, and all following lines until the end of the
file, are read in memory and CRCs computed on all area tags. The list
of CRCs and area tag names is then sorted in order of CRC value and
printed to the standard output. In the case of the QuickBBS format,
the message area number is also printed. Any existing collision (i.e.
two identical CRCs) will be visually and audibly flagged.
- If a command line argument is suplied, it will be treated as the name
of a new EchoMail area, and its CRC will be computed and compared to
the CRCs of all areas listed in the file. Any match, signifying a
collision and danger of cross-linking, will be flagged in the output
listing.
- The program will return a DOS errorlevel of 0 in case of normal
termination, 1 if a collision was detected, 2 if no areas were found
in AREAS.BBS and 3 if AREAS.BBS itself was not found.
Enjoy! Renald Loignon, FidoNet address 1:167/176